﻿#ifndef DADATAMANAGERINTERFACE_H
#define DADATAMANAGERINTERFACE_H
#include "DAInterfaceGlobal.h"
#include "DABaseInterface.h"
#include "DAData.h"
namespace DA
{
class DACoreInterface;
/**
 * @brief 数据管理接口
 */
class DAINTERFACE_API DADataManagerInterface : public DABaseInterface
{
    Q_OBJECT

public:
    DADataManagerInterface(DACoreInterface* c, QObject* par = nullptr);
    ~DADataManagerInterface();

    //添加数据
    virtual void addData(const DAData& d) = 0;
    //移除数据
    virtual void removeData(const DAData& d) = 0;
    //获取数据量
    virtual int getDataCount() const = 0;
    //参数的索引
    virtual int dataIndex(const DAData& d) const = 0;
    //根据索引获取对应的值
    virtual DAData getData(int index) const = 0;
signals:
    void dataBeginAdd(const DAData& d, int willAddIndex);
    void dataEndAdded(const DAData& d, int dataIndex);
    void dataBeginRemove(const DAData& d, int dataIndex);
    void dataEndRemoved(const DAData& d, int dataOldIndex);
};
}  // namespace DA
#endif  // DADATAMANAGERINTERFACE_H
